package com.zlc.workflow.core.process.service;

import com.zlc.common.core.process.model.vo.StoneProcessClassVo;
import com.zlc.common.core.process.model.vo.StoneProcessVo;
import com.zlc.common.model.process.process.ProcessRequestParam;
import com.zlc.workflow.core.process.model.FlowProcess;
import com.zlc.workflow.core.process.model.ProcessClassEntity;
import com.zlc.workflow.core.process.model.ProcessDeployEntity;
import com.zlc.workflow.core.process.model.WorkProcessEntity;

import java.util.List;
import java.util.Map;

public interface ProcessService {

    /**
     * 查询流程定义
     */
    List<StoneProcessVo> queryList(ProcessRequestParam requestParam);

    /**
     * 保存流程定义
     */
    ProcessDeployEntity saveProcess(ProcessDeployEntity entity);

    /**
     * 查询出可发起的流程列表
     */
    List<WorkProcessEntity> queryWorkProcessList();

    /**
     * json对象转xml
     */
    String buildXmlContent(FlowProcess process);


    /**
     * xml转json对象
     */
    FlowProcess buildJsonContent(String xmlContent);

    /**
     * 查询流程设计详情实体
     */
    ProcessDeployEntity getByProcessId(String processId);

    /**
     * 修改流程状态
     */
    void changeStatus(String processId,String status);

    /**
     * 通过流程ID查询流程json数据
     */
    Map<String, String> getProcessJsonByProcessId(String processId);

    /**
     * 类别树
     */
    ProcessClassEntity classTree();

    /**
     * 添加类别
     */
    ProcessClassEntity addClass(StoneProcessClassVo classVo);

    /**
     * 保存类别
     */
    void saveClass(StoneProcessClassVo classVo);

    /**
     * 删除类别
     */
    void removeClass(String classId);


    void addProcessTest(String processId, String content);
}
